<?
	//TODO: clear current status message, update where status = "active" set status = ""
include_once('config.php');
include_once('model/friends.php');

if (isset($_GET["id"])){
	$user_id = $_GET["id"];

	$friends = new Friends();
	$friends->user1_id = Session::user()->id;
	$friends->user2_id = $user_id;
	$friends->delete();
}
header("Location: friends.php");
?>